﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Controls="clr-namespace:CS.Windows.Controls;assembly=CS.Windows.Controls" xmlns:toolkitPrimitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit" 
    xmlns:MVBuddy_Common_Controls="clr-namespace:MVBuddy.Common.Controls;assembly=MVBuddy.Common"
    x:Class="MVBuddy.View.MainPage"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

	<phone:PhoneApplicationPage.DataContext>
		<Binding Mode="OneWay" Path="Main" Source="{StaticResource Locator}"/>
	</phone:PhoneApplicationPage.DataContext>

	<phone:PhoneApplicationPage.ApplicationBar>
		<shell:ApplicationBar>
			<shell:ApplicationBarIconButton Text="login" IconUri="/Assets/AppBar/appbar.next.rest.png" Click="Login_Click" />
		</shell:ApplicationBar>
	</phone:PhoneApplicationPage.ApplicationBar>

    <!--LayoutRoot is the root grid where all page content is placed-->
	<Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource Locator}}" Style="{StaticResource MVPageStyle}">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="*"/>
		</Grid.RowDefinitions>

		<MVBuddy_Common_Controls:PageHeaderControl d:LayoutOverrides="Height"/>

        <!--ContentPanel - place additional content here-->
		<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
			<StackPanel Margin="0,12,0,0">
				<Controls:WatermarkTextBox TextWrapping="Wrap" Height="72" Margin="0,0,0,12" Text="{Binding Main.Username, Mode=TwoWay}" Foreground="{StaticResource MVLightGrayBrush}" FocusedForeground="{StaticResource MVLightOrangeBrush}" WatermarkText="{Binding Path=LocalizedResources.MainPage_Username, Source={StaticResource LocalizedStrings}}"/>
				<Controls:WatermarkPasswordBox Height="72" Password="{Binding Main.Password, Mode=TwoWay}" Margin="0,0,0,12" Foreground="{StaticResource MVLightGrayBrush}" FocusedForeground="{StaticResource MVLightOrangeBrush}" WatermarkText="{Binding Path=LocalizedResources.MainPage_Password, Source={StaticResource LocalizedStrings}}" />
				<toolkit:ToggleSwitch IsChecked="{Binding Main.SaveLogin, Mode=TwoWay}" Header="{Binding Path=LocalizedResources.SaveLogin, Source={StaticResource LocalizedStrings}}" Style="{StaticResource ToggleSwitchTemplate}" Margin="12,0,12,12" />
				<HyperlinkButton Content="{Binding Path=LocalizedResources.MainPage_RegisterAccount, Source={StaticResource LocalizedStrings}}" HorizontalContentAlignment="Left" FontSize="{StaticResource PhoneFontSizeNormal}" NavigateUri="http://m.mediavida.com/join.php" Foreground="{StaticResource MVDarkOrangeBrush}" TargetName="_blank"/>
			</StackPanel></Grid>
	</Grid>
 
</phone:PhoneApplicationPage>